class DesktopController < ApplicationController
  def index
    current_user_id = session[:user_id]
    if current_user_id  == nil
        redirect_to login_url
        return
    end
    current_user = User.find_by_id(current_user_id)
    @gardens = current_user.gardens


  end

  def new_garden

    @garden = Garden.new

    respond_to do |format|
      format.html # new.html.erb
      format.json { render json: @garden }
    end
  end

  def show_garden

  end

  def create_garden

  end


end
